/*
 * @Author: hu_binbin
 * @Date: 2021-06-03 16:22:45
 * @LastEditTime: 2021-06-25 15:09:47
 * @Description: 检修api
 */
import request from '@/utils/request'

/**
 * @description: 终端查询设备维护记录列表
 * @param {*} 
 * @return {*} 
 */
export function queryMaintainDevice(data) {
	return new Promise((resolve, reject) => {
        request.post('/app/deviceMaintain/maintain-record/getMaintainRecordListForApp', data).then(res => {
            if(res) {
                resolve(res)
            } else {
                resolve(false)
            }
        }, err => {
            reject(err)
        })
	})
}

/**
 * @description: 终端维护记录登记
 * @param {*} 
 * @return {*} 
 */
export function registerMaintainRecord(data) {
	return new Promise((resolve, reject) => {
        request.post('/app/deviceMaintain/maintain-record/registerMaintainRecord', data).then(res => {
            if(res) {
                resolve(res)
            } else {
                resolve(false)
            }
        }, err => {
            reject(err)
        })
	})
}
